﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Framework;
using System.Data;
using OLTS.DAL;
using OLTS.MODEL ;
 namespace OLTS.DATA_SERVICE
{
    public class LOGIN_Service : BaseFramework<OTS_LOGIN>
    {
        private string _username = "";
        private string _password = "";
        public LOGIN_Service(string username)
        {
            _username = username;
        }
          
        protected override void ExecuteCommand()
        {

            var ctx = new Entities();
            var obj = ctx.OTS_LOGIN.Include("OTS_EMPLOYEE").Where(x => x.USER_NAME == _username).FirstOrDefault();
            if (obj != null)
            {
                Result = obj;
            }

        }
    }
     
}
